function getCpuDataSheet(cpuId)
{
    var Utils = xdc.useModule('xdc.platform.Utils');
    return (Utils.getCpuDataSheet(this.$private.cpuAttrs));
}

function getExeContext(prog)
{
    var Utils = xdc.module("xdc.platform.Utils");

    var ExeContext = xdc.useModule('xdc.platform.ExeContext');
    var cpu = ExeContext.create(this.$private.cpuAttrs, this.$module.BOARD);

    cpu.memoryMap = Utils.assembleMemoryMap(cpu, this);

    var overlap = Utils.checkOverlap(cpu.memoryMap);

    if (overlap != null) {
        this.$module.$logError("Memory objects " + overlap + " overlap", this,
            overlap);
    }

    Utils.checkDefaults(this, cpu.memoryMap);
    this.$seal();

    return (cpu);
}

function getExecCmd(prog)
{
    var os = environment["xdc.hostOS"];
    if (os == "Windows") {
        var prefix = '';
        var suffix = '\n';
        if (this.dssPath != null) {
            prefix = '\"set DEBUGSERVER=' + this.dssPath + '&&';
            suffix = '\"\n';
        }

        return ("c:/windows/system32/cmd.exe /c " +  prefix + this.$package.packageBase + "/load.bat " + prog.name + suffix);
    }

    return ("$(SHELL) " + this.$package.packageBase + "/load.ksh " + prog.name + "\n");
}

function getLinkTemplate(prog)
{
    return (this.$private.pdir + "/linkcmd.xdt");
}

function instance$meta$init(name)
{
    var IExeContext = xdc.module("xdc.platform.IExeContext");

    this.$private.name = name;
    this.$private.pdir = this.$package.$name.replace(/\./g, '/');

    var cpuAttrs = new IExeContext.Cpu(this.$module.CPU);
    this.$private.cpuAttrs = cpuAttrs;

    if (this.externalMemoryMap.length != 0) {
        this.$module.$logError("External memory cannot be added to this " +
            "platform", this, null);
    }
}
